<?php

include_once 'model/genre.php';
include_once  'model/movie.php';


$conn = mysql_connect('localhost','root','');
if(!$conn){
    die('Could not connect..');
}

mysql_select_db('dbtraining',$conn);

$genre = Genre::load(1);
echo $genre;

//$genre = Genre::load(1);
//echo $genre->getName()."<br>";
//echo Genre::loadForJSON(1);

//echo Movie::loadToJSON(1);

//$mv = Movie::load(1);

//echo "Title: ". $mv->getTitle()."<br>";
//echo "Genre: ". $mv->getGenre()->getName()."<br>";
//
//echo Movie::loadsToJSON();


//foreach ($datas as $value) {
//    echo $value->getName()."<br>";
//}


mysql_close($conn);



?>
